import { praseStrEmpty } from '@/utils/liuliu'
import request from '@/utils/request'
// 根据学生id查询该学生能选择的课程列表
export function listCourseByStudentId(query, studentId) {
  return request({
    url: '/zua/course/listByStudenId/' + praseStrEmpty(studentId),
    method: 'get',
    params: query
  })
}
// 查询course列表
export function listCourse(query) {
  return request({
    url: '/zua/course/list',
    method: 'get',
    params: query
  })
}

// 查询course详细
export function getCourse(courseId) {
  return request({
    url: '/zua/course/' + courseId,
    method: 'get'
  })
}

// 新增course
export function addCourse(data) {
  return request({
    url: '/zua/course',
    method: 'post',
    data: data
  })
}

// 修改course
export function updateCourse(data) {
  return request({
    url: '/zua/course',
    method: 'put',
    data: data
  })
}

// 删除course
export function delCourse(courseId) {
  return request({
    url: '/zua/course/' + courseId,
    method: 'delete'
  })
}

// 导出course
export function exportCourse(query) {
  return request({
    url: '/zua/course/export',
    method: 'get',
    params: query
  })
}
